package com.lab.component.list.simple;

import android.view.ViewGroup;

import com.lab.adapter.IAdapterData;

/**
 * simple view holder 注入特性
 * Created by ak on 4/5/16.
 */
public interface SimpleAdapterInterface<T extends IAdapterData> {

    /**
     * item view 的 layout res id
     *
     * @param viewType
     * @return
     */
    int getItemLayoutId(int viewType);

    /**
     * 当创建好view holder
     *
     * @param viewHolder
     * @param parent
     * @param viewType
     */
    void onNewViewHolder(CTSimpleViewHolder viewHolder, ViewGroup parent, int viewType);

    /**
     * 绑定数据
     *
     * @param holder
     * @param position
     * @param item
     */
    void bindData(CTSimpleViewHolder holder, int position, T item);
}

